<?php

class LanguageController extends Controller{
	
	public $models = array();
	
	public function __construct(){
		parent::__construct();
	}
	
	public function index(){
		redirect("/");
	}
	
	public function set($lang) {
		$ref = $_SERVER["HTTP_REFERER"];
		$ref = $ref ? $ref : "/";
		$this->session_set("language",$lang);
		redirect($ref);
	}

}

?>